﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>

		<base href="${webInfo.domain }" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>章节管理</title>

		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
		<meta http-equiv="description" content="This is my page" />
		<!-- JS File -->
		<link type="image/x-icon" href="favicon.ico" rel="shortcut icon" />
		<link rel="stylesheet" type="text/css" href="style/JS/container/assets/skins/sam/container.css" />

		<link id="change_url" rel="stylesheet" type="text/css" href="style/base.css" />

		<script src="js/jquery.js" type="text/javascript"></script>
		<script src="js/page.js" type="text/javascript"></script>
	</head>
	<body class="page yui-skin-sam page-min-width">
		 
		<!-- 主体 -->
		<div class="trip-manager clearfix">
			<div class="bd clearfix">
				<!-- 主栏 -->
				<div class="main">
					<div class="col1">
						<div class="mod3 card">
							<div class="hd">
								<div class="hd-l"></div>
								<h2>
									章节管理 ${pagin.rowCount }  ${msg}
								</h2>
							</div>
							<div class="bd">
								<div class="bd-l clearfix">
									<form action="system/chapter!search.do" name="f" onsubmit="return btnSubmit(1);" method="post">
										<div id="formSearch" class="form-search">
											<table width="100%" cellspacing="0" cellpadding="0" border="0" id="searchtoggle"
												class="myApprovetable">
												<tbody>
													<tr>
														<td width="120px">
															书籍ID
														</td>
														<td width="100px">
															<input type="text" class="w100" name="pagin.searchParam.bookId"
																value="${pagin.searchParam.bookId}" />
														</td>
														<td width="150px">
															章节名模糊
														</td>
														<td width="100px">
															<input type="text" class="w200" name="pagin.searchParam.chapterName"
																value="${pagin.searchParam.chapterName}" />
														</td>
														<td width="50px">
															<input type="submit" value="查询" class="search-btn" />
														</td>
														<td width="500px">
															&nbsp;
														</td>
													</tr>
												</tbody>
											</table>
										</div>


										<div class="pagination">
											<div class="tc">
												<span class="page-per">每页 <select style="width: 50px;"
														id="ctl00_ContentMain_PageControl2_ddlPerPageRows" onchange="javascript:btnSubmit(1)"
														name="pagin.pageSize">
														<option value="10">
															10
														</option>
														<option value="15">
															15
														</option>
														<option value="20">
															20
														</option>
														<option value="50" selected="selected">
															50
														</option>
														<option value="100">
															100
														</option>
														<option value="200">
															200
														</option>
													</select>行 &nbsp;&nbsp;</span>
												<script type="text/javascript">  
															$("option[value='${pagin.pageSize}']").attr("selected","selected");
													</script>
												<a onclick="javascript:btnSubmit(1)"> <span title="首页" class="page-first"
													id="firstPage">首页</span> </a>
												<c:if test="${pagin.pageNow<=1}">
													<a> <span title="上一页" class='page-pre-disable' id="prevPage">上一页</span> </a>
												</c:if>
												<c:if test="${pagin.pageNow>1}">
													<a onclick="javascript:btnSubmit(${pagin.pageNow-1})"> <span title="上一页"
														class='page-pre' id="prevPage">上一页</span> </a>
												</c:if>
												<span class="page-cur">第 <input type="text" class="input-default"
														value="${pagin.pageNow}" id="pageNow" name="pagin.pageNow" /> <input type="button"
														class="skip" id="jumpPage" name="jumpPage" onclick="cSubmit();" /> 页 <strong
													id="ctl00_ContentMain_PageControl2_lblCurPage">共<b> ${pagin.pageCount} </b> 页</strong>
												</span>

												<c:if test="${pagin.pageNow>=pagin.pageCount}">
													<a> <span title="下一页" class="page-next-disable" id="nextPage">下一页</span> </a>
												</c:if>
												<c:if test="${pagin.pageNow<pagin.pageCount}">
													<a onclick="javascript:btnSubmit(${pagin.pageNow+1})"> <span title="下一页"
														class="page-next" id="nextPage">下一页</span> </a>
												</c:if>
												<a onclick="javascript:btnSubmit(${pagin.pageCount})"> <span title="尾页"
													class="page-end" id="lastPage">尾页</span> </a>
											</div>
										</div>
									</form>
 

									<table width="100%" cellspacing="0" cellpadding="0" border="0" id="tablelist"
										class="table3 text-center">
										<tbody> 										
											<tr>  
												<th>
													标题
												</th>
												<th>
													关键词
												</th> 
												<th>
													更新时间
												</th>
												<th>
													操作
												</th>
											</tr>

											<c:forEach items="${pagin.list}" var="item" begin="0" step="1" varStatus="statu">
												<tr> 
													<td>
														<B><a title='${item.description}'>${item.chapterTitle}</a></B>
													</td> 
													<td>
														<B>${item.keywords  }</B>
													</td>  
													<td> 
														<B><a title='${item.updateTime}'> <fmt:formatDate value='${item.updateTime}' pattern='MM-dd' /></a></B>
													</td>
													<td>
														<a href="system/chapter!toAddChapter.do?chapter.bookId=${item.bookId}">新增</a>
														<a onclick="return false;" href="system/chapter!showModify.do?chapter.cid=${item.cid}">修改</a>|
														<a target="_blank" href="system/chapter!deleteChapter.do?chapter.cid=${item.cid}">删除</a>
													</td>
												</tr>
											</c:forEach>
										</tbody>
									</table>
								</div>
							</div>
							<div class="ft">
								<div class="ft-l"></div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- / 主栏 -->
		</div>
		<!-- / 主体 --> 
	</body>
</html>
